<!DOCTYPE html>
<html style="min-height: 801px;"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="UTF-8">
        <title>AdminLTE | factory management</title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <!-- bootstrap 3.0.2 -->
        <link href="AdminLTE%20_%20factory%20management_files/bootstrap.css" rel="stylesheet" type="text/css">
        <!-- font Awesome -->
        <link href="AdminLTE%20_%20factory%20management_files/font-awesome.css" rel="stylesheet" type="text/css">
        <!-- Ionicons -->
        <link href="AdminLTE%20_%20factory%20management_files/ionicons.css" rel="stylesheet" type="text/css">
        <!-- fullCalendar -->
        <link href="AdminLTE%20_%20factory%20management_files/fullcalendar_002.css" rel="stylesheet" type="text/css">
        <link href="AdminLTE%20_%20factory%20management_files/fullcalendar.css" rel="stylesheet" type="text/css" media="print">
        <!-- Theme style -->
        <link href="AdminLTE%20_%20factory%20management_files/AdminLTE.css" rel="stylesheet" type="text/css">

    	<style type="text/css">
    		.star{
    			color: red;
    		}
    		.special{
    			border: 1px solid #ccc;
    			width: 100%;  				/*更改*/
    			padding: 6px;
    		}
    		
    		/*新增*/
    		.special:nth-child(1) {
    			width: 40%;
    		}
    		select{
    			padding: 6px;
    			width: 100px;
    		}
    		/*新增*/
    		
    		
    		.style label{
    			width: 15%;
    		} 
    		
    	</style>
    </head>
    <body class="skin-blue  pace-done" style="min-height: 801px;"><div class="pace  pace-inactive"><div class="pace-progress" style="width: 100%;" data-progress-text="100%" data-progress="99">
  <div class="pace-progress-inner"></div>
</div>
<div class="pace-activity"></div></div>
        <!-- header logo: style can be found in header.less -->
        <!-- header logo: style can be found in header.less -->
<header class="header">
	<a href="http://139.224.191.23/index.html" class="logo"> <img src="AdminLTE%20_%20factory%20management_files/logo_03.jpg"> 后台管理系统
	</a>
	<!-- Header Navbar: style can be found in header.less -->
	<nav class="navbar navbar-static-top" role="navigation">
		<div class="navbar-right">
			<ul class="nav navbar-nav">
				<!-- Notifications: style can be found in dropdown.less -->
				<li class="dropdown notifications-menu" style="margin:0;">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown"> 
						<i class="iconfont"></i> 设置
					</a>
				</li>
				<!-- User Account: style can be found in dropdown.less -->
				<li class="dropdown user user-menu" style="margin:0;"><a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="glyphicon glyphicon-user"></i> <span><span id="name2">3dfsafttttt</span> <i class="caret"></i></span>
				</a>
					<ul class="dropdown-menu" style="padding: 0">

						<!-- User image -->
						<li class="user-header bg-light-blue">
							<ul class="pull-left" style="border:none;">
								<li id="email">账号：admin</li>
								<li id="name">姓名：3dfsafttttt</li>
								<li id="roleName">角色：设计总监</li>
							</ul>
						</li>
						<!-- Menu Footer-->
						<li class="user-footer">
							<div class="pull-left" style="border:none;">
								<a href="#" class="btn btn-default btn-flat change_btn">修改密码</a>
							</div>
							<div class="pull-right">
								<a id="exit" href="#" class="btn btn-default btn-flat">退出</a>
							</div>
						</li>
					</ul></li>
			</ul>
		</div>
	</nav>
</header>
<!--修改密码弹框-->
<img class="masking" src="AdminLTE%20_%20factory%20management_files/mask.jpg" style="display: none;">
<div class="change_pw" style="display: none;">
	<img id="close" class="pull-right change_delet" src="AdminLTE%20_%20factory%20management_files/close.png">
	<form id="passwordform" action="">
		<div class="old_pw">
			<div class="input-group">
				<span class="input-group-addon new_add">原密码</span> <input id="oldPassword" name="oldPassword" class="form-control" placeholder="请输入原密码" type="password">
			</div>
		</div>
		<div class="new_pw">
			<div class="input-group">
				<span class="input-group-addon">设置新密码</span> <input id="newPassword1" name="newPassword" class="form-control" placeholder="请输入新密码" type="password">
			</div>
			<div>密码由6~8位字母（字母区分大小写）和数字组成</div>
		</div>
		<div class="beSure_pw">
			<div class="input-group">
				<span class="input-group-addon">确认新密码</span> <input id="newPassword2" class="form-control" placeholder="请输入密码" type="password">
			</div>
			<div id="notSame">两次密码不一致</div>
		</div>
	</form>
	<div class="pull-right sure">
		<a id="updatePassword" href="#" class="btn btn-primary">确定</a> <a id="delete" href="#" class="btn btn-default">取消</a>
	</div>
</div>

<style type="text/css">
.user-header ul {
	margin-top: 5px;
	margin-left: 5px;
	padding: 0;
}

.user-header ul li {
	color: rgba(255, 255, 255, 0.8);
	text-align: left;
	margin-top: 20px;
	font-size: 17px;
	list-style: none;
}

.masking {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	opacity: 0.3;
	z-index: 2;
}

.change_pw {
	width: 400px;
	height: 300px;
	background: white;
	position: fixed;
	top: 50%;
	left: 50%;
	margin-left: -200px;
	margin-top: -150px;
	z-index: 3;
	border: 1px solid #bbb;
}

.new_pw, .old_pw, .beSure_pw {
	margin-top: 20px;
	margin-left: 10px;
}

.old_pw {
	margin-top: 40px;
}

.new_pw div:nth-child(2) {
	font-size: 14px;
	margin-left: 20px;
	margin-top: 5px;
	color: red;
}

.beSure_pw div:nth-child(2) {
	display: none; font-size : 14px;
	margin-left: 20px;
	margin-top: 5px;
	color: red;
	font-size: 14px;
}

.old_pw div {
	margin-left: 25px;
}

.change_pw .input-group {
	width: 90%;
}

.change_pw .input-group:nth-child(1) {
	margin-left: 10px;
}

.new_add {
	padding: 6px 27px;
}

.sure {
	margin-right: 15px;
}

.sure a {
	margin: 20px 10px 0 0;
}

.change_delet {
	margin: 10px 10px 0 0;
}

#delete {
	cursor: pointer;
}


/*新增样式      2016/12/01*/
.ol_left{
    width: 100%;
    height: 30px;
    line-height: 30px;
    padding: 0;
}
.ol_left>li{
    float: left;
    margin-right: 5px;
}
.ol_left li, .ol_left{
	margin-bottom: 0;
}
.content-header-right{
	position: absolute; 
	top: 25px; 
	right: 20px;
}
ol li{
	list-style: none;
}
#factoryName{
	border: 1px solid #ccc;
	padding: 6px;
	width: 30%;
}
</style>

<script src="AdminLTE%20_%20factory%20management_files/jquery.js" type="text/javascript"></script>

<script type="text/javascript">
	$('.masking').hide();
	$('.change_pw').hide();

	$('.change_btn').click(function() {
		$('.change_pw').show();
		$('.masking').show();
	});
	$('#delete').click(function() {
		$('.change_pw').hide();
		$('.masking').hide();
		$("#notSame").hide();
		$('#passwordform')[0].reset();
	});
	$('#close').click(function() {
		$('.change_pw').hide();
		$('.masking').hide();
		$("#notSame").hide();
		$('#passwordform')[0].reset();
	});
	$('#exit').click(function(){
		window.location.href="http://139.224.191.23/scm/logout";
	})
	$('#newPassword1').focus(function(){
		$("#notSame").hide();
	});
	$('#newPassword2').focus(function(){
		$("#notSame").hide();
	});
	$(function(){
		//向服务端获取当前用户基本信息
		var url="http://139.224.191.23/scm/sysuser/getUser";
		$.ajax({
			"url":url,
			"type":"get",
			"dataType":"json",
			"success":function(result){
				if(result.head.respCode=="0000000"){
					$('#name2').html(result.body.name);
					$('#email').html("账号："+result.body.email);
					$('#name').html("姓名："+result.body.name);
					var roleName="角色：";
					for(var i=0;i<result.body.roleName.length;i++){
						roleName+=result.body.roleName[i]+"、";
					}
					roleName=roleName.substring(0,roleName.length-1);
					$('#roleName').html(roleName);
				}
			},
			/* "error":function(result){
				if(result.head.respCode=="9999990"){
           		 	alert(result.body);
           		 }
			} */
		});
		//修改密码
		$('#updatePassword').click(function(){
			if($('#newPassword1').val()==""||$('#newPassword2').val()==""||$('#oldPassword').val()==""){
				alert("密码不能为空");
				return;
			}
			//两次密码不一致
			if($('#newPassword1').val()!=$('#newPassword2').val()){
				$("#notSame").show();
				return;
			}
			var formData = new FormData($('#passwordform')[0]);
			url="http://139.224.191.23/scm/sysuser/updatePassword";
			$.ajax({
				url: url,
				type: "post",
				data: formData,
				dataType: "json",
				async: false,  
	            cache: false,  
	            contentType: false,  
	            processData: false,
				success: function(result){
					if(result.head.respCode=="0000000"){
						alert(result.body);
						if(result.body=="密码修改成功"){
							window.location.href="http://139.224.191.23/scm/logout";
						}
						$('#passwordform')[0].reset();
					}
				},
				"error": function(result){
					if(result.head.respCode=="9999990"){
		           		 alert(result.body);
		           		$('#passwordform')[0].reset();
		           	}
				}
			});
		});
	})
</script>        <div class="wrapper row-offcanvas row-offcanvas-left" style="min-height: 713px;">
            <!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas" style="min-height: 801px;">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                     <li class="active">
                            <a href="http://139.224.191.23/scm/factory/index">
                                <i class="fa fa-th"></i> <span>工作台</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                                                	 <li>
                            <a href="http://139.224.191.23/scm/designorder/list">
                                <i class="fa fa-th"></i> <span>设计订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/proofingorder/list">
                                <i class="fa fa-th"></i> <span>打样订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/productionorder/list">
                                <i class="fa fa-th"></i> <span>大货订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/hisgoryorder/list">
                                <i class="fa fa-th"></i> <span>历史订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/customer/list">
                                <i class="fa fa-th"></i> <span>客户管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/factory/list">
                                <i class="fa fa-th"></i> <span>工厂管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/designstore/list">
                                <i class="fa fa-th"></i> <span>设计库</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/sysuser/list">
                                <i class="fa fa-th"></i> <span>员工管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/operatelog/list">
                                <i class="fa fa-th"></i> <span>日志管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        	 <li>
                            <a href="http://139.224.191.23/scm/sysrole/list">
                                <i class="fa fa-th"></i> <span>角色管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                    </ul>
                </section>
                <!-- /.sidebar -->
            </aside>            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
            	<section class="content-header">
                    <h1>新增工厂</h1>
                    
                    
                    <!--2016/12/01 修改-->
                    <ol class="ol_left">
		                <li>当前位置：</li>
		                <li><a href="http://139.224.191.23/scm/customer/list">工厂管理</a></li>
		                <li>> 新增工厂</li>
		            </ol>
	               <!--修改-->
	               
	               
                </section>
                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="box" style="padding: 20px;">
                                
                                <div class="box-title">
                                <form id="add_factory" action="/jhzz_scm/factory/insertFactory" method="post" enctype="multipart/form-data">
                                	<table class="table table-bordered">
                                    	<tbody><tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>工厂名称</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<input id="factoryName" name="factoryName" placeholder="请输入工厂名称" type="text">
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>工厂地址</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div style="overflow: hidden;">
													<div style="float: left; margin-right: 5px;">
														<select id="province" name="provinceId"><option value="0" selected="selected">请选择</option><option value="2">北京</option><option value="3">安徽</option><option value="4">福建</option><option value="5">甘肃</option><option value="6">广东</option><option value="7">广西</option><option value="8">贵州</option><option value="9">海南</option><option value="10">河北</option><option value="11">河南</option><option value="12">黑龙江</option><option value="13">湖北</option><option value="14">湖南</option><option value="15">吉林</option><option value="16">江苏</option><option value="17">江西</option><option value="18">辽宁</option><option value="19">内蒙古</option><option value="20">宁夏</option><option value="21">青海</option><option value="22">山东</option><option value="23">山西</option><option value="24">陕西</option><option value="25">上海</option><option value="26">四川</option><option value="27">天津</option><option value="28">西藏</option><option value="29">新疆</option><option value="30">云南</option><option value="31">浙江</option><option value="32">重庆</option><option value="33">香港</option><option value="34">澳门</option><option value="35">台湾</option></select>
													</div>
													<div style="float: left; margin-right: 5px;">
														<select id="city" name="cityId">
															<option value="0" selected="selected">请选择</option>
														</select>
													</div>
													<div style="float: left;">
														<select id="area" name="areaId">
															<option value="0" selected="selected">请选择</option>
														</select>
													</div>
												</div>
												<div>
													<input id="detailAddress" name="detailAddress" class="address special" placeholder="填写详细地址" type="text" style="margin-top: 5px;">
												</div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>联系人</span>
                                    		</td>
                                    		<td>
                                    			<input id="linkman" name="linkman" class=" special" type="text">
                                    		</td>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>联系电话</span>
                                    		</td>
                                    		<td colspan="3">
                                    			<input id="contact" name="contact" class="special" type="text">
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>工厂人数</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div id="personAmount" class="style"><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="personAmount" value="50人以下" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>50人以下</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="personAmount" value="50~100人" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>50~100人</label><label class=""><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="personAmount" value="100~200人" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>100~200人</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="personAmount" value="200人以上" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>200人以上</label></div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>梭织类型</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div id="tattingStyle" class="style" style="margin-bottom: 15px;"><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="1" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>羽绒服</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="2" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>夹克</label><label class=""><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="3" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>外套</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="4" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>呢大衣</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="5" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>连衣裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="6" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>短裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="7" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>裤子</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="8" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>衬衣</label><label class=""><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="9" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>登山服</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="10" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>防水服</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="59" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>西服</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="tattingStyleIds" value="60" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>背心</label></div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>针织类型</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div id="wovenStyle" class="style" style="margin-bottom: 15px;"><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="15" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>外套</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="16" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>裤子</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="17" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>睡衣</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="18" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>T恤</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="19" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>Polo衫</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="20" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>连衣裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="21" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>短裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="wovenStyleIds" value="61" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>西服</label></div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>毛衣类型</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div id="sweaterStyle" class="style" style="margin-bottom: 15px;"><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="22" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>外套</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="23" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>开衫</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="24" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>圆领</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="25" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>V领</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="26" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>连衣裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="27" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>短裙</label><label><div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="sweaterStyleIds" value="62" style="position: absolute; opacity: 0;" type="checkbox"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>背心</label></div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>销往目的地</span>
                                    		</td>
                                    		<td id="saleTarget" colspan="5"><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="saleTarget" value="内销" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>内销</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="saleTarget" value="外销" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>外销</label></td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>合作条件</span>
                                    		</td>
                                    		<td colspan="5">
                                    			<div id="cooperationCondition" class="style"><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="cooperationCondition" value="20件以下" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>20件以下</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="cooperationCondition" value="20~50件" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>20~50件</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="cooperationCondition" value="50~100件" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>50~100件</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="cooperationCondition" value="100~300件" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>100~300件</label><label><div class="iradio_minimal" style="position: relative;" aria-checked="false" aria-disabled="false"><input name="cooperationCondition" value="300件以上" style="position: absolute; opacity: 0;" type="radio"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: 0px none; opacity: 0;"></ins></div>300件以上</label></div>
                                    		</td>
                                    	</tr>
                                    	<tr>
                                    		<td>
                                    			<span class="star">*</span>
                                    			<span>工厂评估</span>
                                    		</td>
                                    		<td colspan="5">

                                    			<div>
                                    				<input id="estimateReport" name="estimateReport" multiple="" type="file">
                                    			</div>
                                    		</td>
                                    	</tr>
                                   </tbody></table>
                                   </form>
                                   	<div style="margin-bottom: 50px;">
				                		<button id="add" type="button" class="btn btn-primary">确定新建</button>
					                	<button id="clean" type="button" class="btn btn-default">放弃新建</button>
					                </div>
                                </div>
                            </div><!-- /.box -->

                            
                        </div><!-- /.col -->
                        
                    </div><!-- /.row -->
                    
                </section><!-- /.content -->
                
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
        <script src="AdminLTE%20_%20factory%20management_files/jquery.js"></script>
        <!-- jQuery UI 1.10.3 -->
        <script src="AdminLTE%20_%20factory%20management_files/jquery-ui-1.js" type="text/javascript"></script>
        
        <script type="text/javascript">
        $(function(){
        	//获取所有省数据
        	getAllProvince();
        	$('#province').change(provinceOnSelect);
        	$('#city').change(cityOnSelect);
        	//获取工厂人数列表
        	getPersonAmount();
        	//获取梳织类型列表
        	getTattingStyle();
        	//获取针织类型列表
        	getWovenStyle();
        	//获取毛衣类型列表
        	getSweaterStyle();
        	//获取销往目的地列表
        	getSaleTarget();
        	//获取合作条件
        	getCooperationCondition();
        	//新建按钮点击事件
        	$('#add').click(addFactory);
        	//清除表单数据
        	$('#clean').click(cleanForm);
        	
        });

        //获取所有省数据
        function getAllProvince(){
        	var url = "../area/province";
        	$.getJSON(url,function(result){
        		if(result.head.respCode=="0000000"){
        			var provinces = result.body.rows;
        			var view = $('#province');
        			view.empty();
        			var option = $('<option value="0">请选择</option>');
        			view.append(option)
        			for(var i=0;i<provinces.length;i++){
        				var option = $('<option value="'+provinces[i].areaId+'">'+provinces[i].areaName+'</option>');
        				view.append(option);
        			}
        		}
        	});
        }

        //从服务端根据parentId获取对应的市列表
        function getCityByParentId(parentId){
        	//console.log(parentId);
        	var url = "../area/cityOrArea";
        	var data = {"parentId":parentId};
        	$.getJSON(url,data,function(result){
        		if(result.head.respCode=="0000000"){
        			var citys = result.body.rows;
        			var view = $('#city');
        			view.empty();
        			var option = $('<option value="0">请选择</option>');
        			view.append(option)
        			for(var i=0;i<citys.length;i++){
        				var option = $('<option value="'+citys[i].areaId+'">'+citys[i].areaName+'</option>');
        				view.append(option);
        			}
        		}
        	});
        }

        //从服务端根据parentId获取对应的区县列表
        function getAreaByParentId(parentId){
        	//console.log(parentId);
        	var url = "../area/cityOrArea";
        	var data = {"parentId":parentId};
        	$.getJSON(url,data,function(result){
        		if(result.head.respCode=="0000000"){
        			var areas = result.body.rows;
        			var view = $('#area');
        			view.empty();
        			var option = $('<option value="0">请选择</option>');
        			view.append(option)
        			for(var i=0;i<areas.length;i++){
        				var option = $('<option value="'+areas[i].areaId+'">'+areas[i].areaName+'</option>');
        				view.append(option);
        			}
        		}
        	});
        }

        //省下拉框选中监听事件
        function provinceOnSelect(){
        	if($(this).val()!="0"){
        		//console.log($(this).val());
        		//省选中后清空所有
        		cleanArea();
        		var provinceId = $(this).val();
        		//从服务端获取对应的城市列表
        		getCityByParentId(provinceId);
        	}
        	if($(this).val()=="0"){
        		cleanCity();
        		cleanArea();
        	}
        }

        //市下拉框选中监听事件
        function cityOnSelect(){
        	if($(this).val()!="0"){
        		var cityId = $(this).val();
        		//从服务端获取对应的区县列表
        		getAreaByParentId(cityId);
        	}
        	if($(this).val()=="0"){
        		cleanArea();
        	}
        }


        //清空市
        function cleanCity(){
        	var view = $('#city');
        	view.empty();
        	var option = $('<option value="0">请选择</option>');
        	view.append(option);
        }

        //清空区县
        function cleanArea(){
        	var view = $('#area');
        	view.empty();
        	var option = $('<option value="0">请选择</option>');
        	view.append(option);
        }

        //获取工厂人数列表
        function getPersonAmount(){
        	var constants = getConstant("scm_factory-person_amount");
        	var view = $('#personAmount');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="radio" name="personAmount" value="'+constants[i].name+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //获取梳织类型列表
        function getTattingStyle(){
        	var constants = getConstant("scm_factory-tatting_style");
        	var view = $('#tattingStyle');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="checkbox" name="tattingStyleIds" value="'+constants[i].id+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //获取针织类型列表
        function getWovenStyle(){
        	var constants = getConstant("scm_factory-woven_style");
        	var view = $('#wovenStyle');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="checkbox" name="wovenStyleIds" value="'+constants[i].id+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //获取毛衣类型列表
        function getSweaterStyle(){
        	var constants = getConstant("scm_factory-sweater_style");
        	var view = $('#sweaterStyle');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="checkbox" name="sweaterStyleIds" value="'+constants[i].id+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //获取销往目的地列表
        function getSaleTarget(){
        	var constants = getConstant("scm_factory-sale_target");
        	var view = $('#saleTarget');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="radio" name="saleTarget" value="'+constants[i].name+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //获取合作条件
        function getCooperationCondition(){
        	var constants = getConstant("scm_factory-cooperation_condition");
        	var view = $('#cooperationCondition');
        	view.empty();
        	for(var i=0;i<constants.length;i++){
        		var label = $('<label><input type="radio" name="cooperationCondition" value="'+constants[i].name+'"  />'+constants[i].name+'</label>')
        		view.append(label);
        	}
        }

        //根据分类条件查询所有的常量列表
        function getConstant(category){
        	var constants={};
        	var url = "../constant/getConstantByCategory";
        	var data = {"category":category};
        	//关闭ajax异步
        	$.ajaxSettings.async = false;
        	$.getJSON(url,data,function(result){
        		if(result.head.respCode="0000000"){
        			constants = result.body.rows;
        		}
        	});
        	//开启ajax异步
        	$.ajaxSettings.async = true;
        	return constants;
        }

        //新增工厂
        function addFactory(){
        	//$("form").submit();
        	var formData = new FormData($("#add_factory")[0]);  
            $.ajax({  
                 url: '../factory/insertFactory' ,  
                 type: 'POST',  
                 data: formData,  
                 async: false,  
                 cache: false,  
                 contentType: false,  
                 processData: false,  
                 success: function (result) {
                	 if(result.head.respCode=="0000000"){
                		 alert(result.body);
                		 if(result.body=="新建工厂成功"){
                			 window.location.href="../factory/list";
                		 }
                	 }
                 },  
                 error: function (result) {  
                	 if(result.head.respCode=="9999990"){
                		 alert(result.body);
                	 }
                 }
            });
        }

        //清空表单数据
        function cleanForm(){
        	alert("放弃新建，本次数据将不进行保存");
        	$('#add_factory')[0].reset();
        }

        </script>
        
        <!-- Bootstrap -->
        <script src="AdminLTE%20_%20factory%20management_files/bootstrap.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="AdminLTE%20_%20factory%20management_files/app.js" type="text/javascript"></script>
        
        
    

<script src="AdminLTE%20_%20factory%20management_files/t.js" charset="utf-8"></script></body></html>